package com.rmc.constanst;

import java.util.Comparator;

public abstract class Constants {

	public static final String NEW_LINE = System.getProperty("line.separator");


	public static <T> Comparator<T> earlyFirstOrder() {
		return new Comparator<T>() {
			@SuppressWarnings({"ComparatorMethodParameterNotUsed"})
			@Override
			public int compare(T o1, T o2) {
				return o1.equals(o2) ? 0 : 1;
			}
		};
	}

	public static <T> Comparator<T> lateFirstOrder() {
		return new Comparator<T>() {
			@SuppressWarnings({"ComparatorMethodParameterNotUsed"})
			@Override
			public int compare(T o1, T o2) {
				return o1.equals(o2) ? 0 : -1;
			}
		};
	}
}
